package com.controller.ningdong;



import com.entity.BuildingAreaQuery;
import com.entity.HousePropertyCount;
import com.service.ningdong.impl.CountServiceImpl;
import com.util.gzp.AjaxResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.Date;
import java.util.List;

/**
 * 综合统计
 */

@Controller
@ResponseBody
@RequestMapping("/count")
public class CountController {

    @Autowired
    private CountServiceImpl countService;

    /**
     * 建筑面积统计
     * @param startTime
     * @param endTime
     * @return
     */
    @RequestMapping("/buildingacreageCount")
    public AjaxResponse buildingacreageCount(Date startTime, Date endTime){
        List<BuildingAreaQuery> buildingAreaCountList = countService.buildingacreageCount(startTime, endTime);
        System.out.println("-------------"+buildingAreaCountList);
        return  AjaxResponse.success(buildingAreaCountList,"233333");
    }

    /**
     * 建筑区域统计
     * @param startTime
     * @param endTime
     * @return
     */
    @RequestMapping("/buildingareaCount")
    public AjaxResponse buildingareaCount(Date startTime, Date endTime){
        List<BuildingAreaQuery> buildingAreaCountList = countService.buildingareaCount(startTime, endTime);
        System.out.println("-------------"+buildingAreaCountList);
        return  AjaxResponse.success(buildingAreaCountList,"233333");
    }

    /**
     * 房屋性质统计
     * @param startTime
     * @param endTime
     * @return
     */
    @RequestMapping("/houseProperty")
    public AjaxResponse houseProperty(Date startTime, Date endTime){
        List<HousePropertyCount> housePropertyCountList = countService.houseProperty(startTime, endTime);
        System.out.println("-------------"+housePropertyCountList);
        return  AjaxResponse.success(housePropertyCountList,"233333");
    }




}
